Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerfile: additional expansions #1241

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hdonnay
Copy link
Member

@hdonnay hdonnay commented Feb 7, 2024

Saw some errors on quayio's instance related to variable expansions.
Checking the buildkit dockerfile frontend, it supports the whole compliment of POSIX expansions and bash-style replace (${var/pat/word/}).

This PR implements all the POSIX expansions and reports a dedicated error for the slash pattern replacement.


  • Check changes after finding an exemplar problematic Dockerfile

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 56.30%. Comparing base (e8f9aff) to head (29d187a).

Files Patch % Lines
rhel/dockerfile/vars.go 85.10% 19 Missing and 2 partials ⚠️
rhel/dockerfile/dockerfile.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1241      +/-   ##
==========================================
+ Coverage   55.76%   56.30%   +0.53%     
==========================================
  Files         265      265              
  Lines       16562    16675     +113     
==========================================
+ Hits         9236     9389     +153     
+ Misses       6365     6323      -42     
- Partials      961      963       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hdonnay hdonnay force-pushed the bug/dockerfile-expansions branch from 550e102 to 4b42bfd Compare February 8, 2024 15:27
@hdonnay
Copy link
Member Author

hdonnay commented Feb 8, 2024

I've run this through the fuzzer for a while, with no crashers being reported.

fuzz: elapsed: 30m1s, execs: 121110401 (0/sec), new interesting: 51 (total: 388)

@hdonnay hdonnay force-pushed the bug/dockerfile-expansions branch from 4b42bfd to c325e4a Compare February 13, 2024 21:25
@hdonnay hdonnay force-pushed the bug/dockerfile-expansions branch from c325e4a to 97268e9 Compare April 12, 2024 14:09
hdonnay added 3 commits April 15, 2024 13:10
This makes things much simpler, IMO.

Signed-off-by: Hank Donnay <[email protected]>
@hdonnay hdonnay force-pushed the bug/dockerfile-expansions branch from 97268e9 to 29d187a Compare April 15, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant